package com.cytech.cloudclinic.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.cytech.cloudclinic.R;
import com.cytech.cloudclinic.bean.Expert;
import com.cytech.cloudclinic.utils.ImageUtils;

import java.util.List;

public class ExpertAdapter extends BaseQuickAdapter<Expert, BaseViewHolder> {
    public ExpertAdapter( List<Expert> data) {
        super(R.layout.item_expert_main, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Expert expert) {
        baseViewHolder.setText(R.id.iv_item_export_name,expert.name);
        ImageView avatar = baseViewHolder.getView(R.id.iv_item_export_avatar);
        ImageUtils.showRound(getContext(),avatar,expert.picture);
    }
}
